#pragma once
#include "hashTable.h"

namespace zhang
{
	template<class K, class Hash = HashFunc<K>>
	class unordered_set
	{
		struct SetKeyOfValue
		{
			const K& operator()(const K& data)
			{
				return data;
			}
		};

	public:
		typedef typename HashTable<K, K, Hash, SetKeyOfValue>::iterator iterator;

		iterator begin()
		{
			return _ht.begin();
		}

		iterator end()
		{
			return _ht.end();
		}

		std::pair<iterator, bool> insert(const K& data)
		{
			return _ht.insert(data);
		}

		iterator find(const K& data)
		{
			return _ht.find(data);
		}

		bool erase(const K& data)
		{
			return _ht.find(data);
		}

	private:
		HashTable<K, K, Hash, SetKeyOfValue> _ht;
	};
}


